/*===========================================================================+
 |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
 |                         All rights reserved.                              |
 +===========================================================================+
 |  HISTORY                                                                  |
 +===========================================================================*/
package xxhci.oracle.apps.xxierp.SalaryAdvance.webui;

import java.io.Serializable;

import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;

import oracle.jbo.Row;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;

import xxhci.oracle.apps.XXIERP.PDSPSample.server.XxierpPDSP_VOImpl;
import xxhci.oracle.apps.XXIERP.SalaryAdvance.server.RequestDetailsVORowImpl;
import xxhci.oracle.apps.XXIERP.SalaryAdvance.server.XxierpSalaryAdvEOImpl;

/**
 * Controller for ...
 */
public class SalaryAdvanceRequestCO extends OAControllerImpl
{
  public static final String RCS_ID="$Header$";
  public static final boolean RCS_ID_RECORDED =
        VersionInfo.recordClassVersion(RCS_ID, "%packagename%");

  /**
   * Layout and page setup logic for a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
    
    /*   OAApplicationModule am =
                         pageContext.getApplicationModule(webBean);
      
            am.invokeMethod("createRequestMethod2");
            
      String PersonId1 = "12";
      Date dt="SYSDATE"
      Serializable[] initParams1 = { PersonId1 };
      am.invokeMethod("getRequestDetails", initParams1);
      
      //XxierpSalaryAdvEOImpl obj=new XxierpSalaryAdvEOImpl();
     OAViewObject vo=(OAViewObject) am.findViewObject("RequestDetailsVO1");
   
         Row row[]=vo.getAllRowsInRange();
         Number PersonId= (Number) row[0].getAttribute("PersonId");
      OAMessageTextInputBean EmployeeNo =  (OAMessageTextInputBean)webBean.findChildRecursive("EmployeeNo");
      EmployeeNo.setValue(pageContext,PersonId);
      
      Number DId= (Number) row[0].getAttribute("DId");
      OAMessageTextInputBean EmpDeptId =  (OAMessageTextInputBean)webBean.findChildRecursive("EmpDeptId");
      EmpDeptId.setValue(pageContext,DId);
      
      Number PapEmpServicePeriod= (Number) row[0].getAttribute("PapEmpServicePeriod");
      OAMessageTextInputBean EmpServicePeriod =  (OAMessageTextInputBean)webBean.findChildRecursive("EmpServicePeriod");
      EmployeeNo.setValue(pageContext,PapEmpServicePeriod);
     
                   
       */
  
            
  }
  public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processFormRequest(pageContext, webBean);
  }

}
